import request from '@/utils/request'

// 查询app类别列表
export function listCategory(query) {
  return request({
    url: '/NexusSphere/category/list',
    method: 'get',
    params: query
  })
}

// 查询app类别详细
export function getCategory(id) {
  return request({
    url: '/NexusSphere/category/' + id,
    method: 'get'
  })
}

// 新增app类别
export function addCategory(data) {
  return request({
    url: '/NexusSphere/category',
    method: 'post',
    data: data
  })
}

// 修改app类别
export function updateCategory(data) {
  return request({
    url: '/NexusSphere/category',
    method: 'put',
    data: data
  })
}

// 删除app类别
export function delCategory(id) {
  return request({
    url: '/NexusSphere/category/' + id,
    method: 'delete'
  })
}
export const getCategoryNameList = () => {
  return request.get('/NexusSphere/category/list');
}

export const selectCategoryNavAllAPI = () => {
  return request.get('/User/NexusSphere/category/nav/all');
}
